import java.util.Arrays;

/**
 * Created by 14229 on 2020/2/19.
 */
public class Test04 {
    public static void main(String[] args) {

        int[] arr = {11,21,5,12,7,14};
        int a =  arr.length/2;
        for (int i = 0; i <a; i++) {
            int coun = arr[arr.length-(i+1)];
            if (arr[i]<coun){
                int c = arr[i];
                arr[i] = coun;
                arr[arr.length-(i+1)] = c;
            }
        }
        System.out.println(Arrays.toString(arr));
    }
}
